<template>
	<div class="audit_list">
		<div class="content">
			<div class="lefts">
				<div class="user_login">
					<img v-if="urls" :src="urls" alt="" />
					<img v-else src="../../assets/images/auditSystem/default2.png" alt="" />
					<p>{{ username }}</p>
					<h3 @click="loginOut">退出登录</h3>
				</div>
				<div class="nav_lists">
					<div class="nav_list" :class="{white:selIndex===item.id}" @click="selects(item.id)" v-for="item in manageList" :key="item.id">
						<img :src="item.img" alt="" />
						<p class="selected" v-if="selIndex===item.id"></p>
					</div>
				</div>
			</div>
			<!-- 线下 -->
			<div class="rights" v-if="selIndex===1">
				<div class="nav_title">
					<h1>线下审核管理</h1>
					<p>&nbsp;| Underline&nbsp;Audit Management</p>
				</div>
				<div class="border_right">
					<div class="conditions">
						<div class="condition1">
							<p>关键字</p>
							<input @keydown.stop="enters" type="text" v-model.trim="input1" />
						</div>
						<el-select @keydown.native="enters" v-model="value3" placeholder="审核状态" size="mini" style="width:110px;">
							<el-option v-for="item in option3" :key="item.value" :label="item.label" :value="item.value">
							</el-option>
						</el-select>
						<button @keydown.stop="enters" @click="querys">查询</button>
					</div>
					<div class="data_lists">
						<!-- 这个key的作用很大，否则一个页面引用多个table会报错_self.$scopedSlots.default is not a function -->
						<el-table v-loading="loading1" :data="tableData.data" border style="width:100%;" key="table1">
							<el-table-column type="index" label="序号" width="64">
							</el-table-column>
							<el-table-column prop="storeName" label="宝店名称" width="200">
							</el-table-column>
							<el-table-column prop="catName" label="主营业务" width="120">
							</el-table-column>
							<el-table-column prop="created" label="提交时间" width="164">
								<template slot-scope="scope">
									<p v-if="scope.row.created">{{ scope.row.created | removeT }}</p>
									<p v-else>--</p>
								</template>
							</el-table-column>
							<el-table-column prop="comefrom" label="提交来源" width="100">
								<template slot-scope="scope">
									<p v-if="scope.row.comefrom===0">未知</p>
									<p v-if="scope.row.comefrom===1">app</p>
									<p v-if="scope.row.comefrom===2">微信</p>
								</template>
							</el-table-column>
							<el-table-column prop="status" label="审核状态" width="100">
								<template slot-scope="scope">
									<p v-if="scope.row.status===0" style="color:#4492e1;">待审核</p>
									<p v-if="scope.row.status===1" style="color:#24c968;">审核通过</p>
									<p v-if="scope.row.status===-1" style="color:#f81623;">审核不通过</p>
									<p v-if="scope.row.status===-2" style="color:#f81623;">删除</p>
								</template>
							</el-table-column>
							<el-table-column prop="option" label="操作">
								<template slot-scope="scope">
									<el-button style="background:#6296ea;font-size:15px;color:#fff;" @click.native="goDetail(scope.row.id)">查看详情
									</el-button>
								</template>
							</el-table-column>
						</el-table>
					</div>
					<div class="pages">
						<el-pagination background prev-text="上一页" next-text="下一页" @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="page1" :page-sizes="[5,10,20]" :page-size="pageSize1" layout="total, sizes, prev, pager, next, jumper" :total="tableData.count">
						</el-pagination>
					</div>
				</div>
			</div>
			<!-- 线上 -->
			<div class="rights" v-if="selIndex===2">
				<div class="nav_title">
					<h1>线上审核管理</h1>
					<p>&nbsp;| Online Audit Management</p>
				</div>
				<div class="border_right">
					<div class="conditions">
						<div class="condition1">
							<p>关键字</p>
							<input @keydown.stop="enters_1" type="text" v-model.trim="input1_1" />
						</div>
						<el-select @keydown.native="enters_1" v-model="value1_1" placeholder="提交来源" size="mini" style="width:110px;">
							<el-option v-for="item in option1_1" :key="item.value" :label="item.label" :value="item.value">
							</el-option>
						</el-select>
						<el-select @keydown.native="enters_1" v-model="value3_1" placeholder="审核状态" size="mini" style="width:110px;">
							<el-option v-for="item in option3_1" :key="item.value" :label="item.label" :value="item.value">
							</el-option>
						</el-select>
						<button @keydown.stop="enters_1" @click="querys_1">查询</button>
					</div>
					<div class="data_lists">
						<el-table v-loading="loading1_1" :data="tableData_1.data" border style="width:100%;" key="table2">
							<el-table-column type="index" label="序号" width="64">
							</el-table-column>
							<el-table-column prop="storeName" label="宝店名称" width="200">
							</el-table-column>
							<el-table-column prop="shop_type" label="宝店类型" width="120">
								<template slot-scope="scope">
									<p v-if="scope.row.shop_type===0">媒体运营</p>
									<p v-if="scope.row.shop_type===1">线上电商</p>
									<p v-if="scope.row.shop_type===2">个人号</p>
									<p v-if="scope.row.shop_type===3">原厂直销</p>
								</template>
							</el-table-column>
							<el-table-column prop="created" label="提交时间" width="164">
								<template slot-scope="scope">
									<p v-if="scope.row.created">{{ scope.row.created | removeT }}</p>
									<p v-else>--</p>
								</template>
							</el-table-column>
							<el-table-column prop="comefrom" label="提交来源" width="100">
								<template slot-scope="scope">
									<p v-if="scope.row.comefrom===0">未知</p>
									<p v-if="scope.row.comefrom===1">app</p>
									<p v-if="scope.row.comefrom===2">微信</p>
								</template>
							</el-table-column>
							<el-table-column prop="status" label="审核状态" width="100">
								<template slot-scope="scope">
									<p v-if="scope.row.status===0" style="color:#4492e1;">待审核</p>
									<p v-if="scope.row.status===1" style="color:#24c968;">审核通过</p>
									<p v-if="scope.row.status===-1" style="color:#f81623;">审核不通过</p>
									<p v-if="scope.row.status===-2" style="color:#f81623;">删除</p>
								</template>
							</el-table-column>
							<el-table-column prop="option" label="操作">
								<template slot-scope="scope">
									<el-button style="background:#6296ea;font-size:15px;color:#fff;" @click.native="goDetail_1(scope.row.id,scope.row.shop_type)">查看详情
									</el-button>
								</template>
							</el-table-column>
						</el-table>
					</div>
					<div class="pages">
						<el-pagination background prev-text="上一页" next-text="下一页" @size-change="handleSizeChange_1" @current-change="handleCurrentChange_1" :current-page="page1_1" :page-sizes="[5,10,20]" :page-size="pageSize1_1" layout="total, sizes, prev, pager, next, jumper" :total="tableData_1.count">
						</el-pagination>
					</div>
				</div>
			</div>
			<!-- 创客 -->
			<div class="rights" v-if="selIndex===3">
				<div class="nav_title">
					<h1>创客</h1>
					<p>&nbsp;|&nbsp;Maker</p>
				</div>
				<div class="border_right">
					<div class="conditions">
						<div class="condition1">
							<p>关键字</p>
							<input @keydown.stop="enters22" type="text" v-model.trim="input22" />
						</div>
						<el-select @keydown.native="enters22" v-model="value22" placeholder="提交来源" size="mini" style="width:110px;">
							<el-option v-for="item in option22" :key="item.value" :label="item.label" :value="item.value">
							</el-option>
						</el-select>
						<el-select @keydown.native="enters22" v-model="value23" placeholder="审核状态" size="mini" style="width:110px;">
							<el-option v-for="item in option23" :key="item.value" :label="item.label" :value="item.value">
							</el-option>
						</el-select>
						<button @keydown.stop="enters22" @click="querys22">查询</button>
					</div>
					<div class="data_lists">
						<el-table v-loading="loading22" :data="tableData22.data" border style="width:100%;" key="table3">
							<el-table-column type="index" label="序号" width="64">
							</el-table-column>
							<el-table-column prop="name" label="宝店名称" width="180">
							</el-table-column>
							<el-table-column prop="created" label="提交时间" width="160">
								<template slot-scope="scope">
									<p v-if="scope.row.created">{{ scope.row.created | removeT }}</p>
									<p v-else>--</p>
								</template>
							</el-table-column>
							<el-table-column prop="comefrom" label="提交来源">
								<template slot-scope="scope">
									<p v-if="scope.row.comefrom===0">未知</p>
									<p v-if="scope.row.comefrom===1">app</p>
									<p v-if="scope.row.comefrom===2">微信</p>
								</template>
							</el-table-column>
							<el-table-column prop="status" label="状态">
								<template slot-scope="scope">
									<p v-if="scope.row.status===0" style="color:#4492e1;">待审核</p>
									<p v-if="scope.row.status===1" style="color:#24c968;">审核通过</p>
									<p v-if="scope.row.status===-1" style="color:#f81623;">审核不通过</p>
									<p v-if="scope.row.status===-2" style="color:#f81623;">删除</p>
								</template>
							</el-table-column>
							<el-table-column prop="option" label="操作">
								<template slot-scope="scope">
									<el-button style="background:#6296ea;font-size:15px;color:#fff;" @click.native="goDetail22(scope.row.id)">查看详情
									</el-button>
								</template>
							</el-table-column>
						</el-table>
					</div>
					<div class="pages">
						<el-pagination background prev-text="上一页" next-text="下一页" @size-change="handleSizeChange22" @current-change="handleCurrentChange22" :current-page="page22" :page-sizes="[5,10,20]" :page-size="pageSize22" layout="total, sizes, prev, pager, next, jumper" :total="tableData22.count">
						</el-pagination>
					</div>
				</div>
			</div>
			<!-- 活动 -->
			<div class="rights" v-if="selIndex===4">
				<acti></acti>
			</div>
			<!-- 秒杀 -->
			<div class="rights" v-if="selIndex===5">
				<seck></seck>
			</div>
			<!-- 广告 -->
			<div class="rights" v-if="selIndex===6">
				<ad></ad>
			</div>
			<!-- 修改密码 -->
			<div class="rights" v-if="selIndex===99">
				<div class="nav_title">
					<h1>系统管理</h1>
					<p>&nbsp;|&nbsp;System Management</p>
				</div>
				<div class="options_pwd">
					<div class="origin_pwd">
						<p>原密码</p>
						<input type="password" v-model.trim="input5" />
					</div>
					<div class="origin_pwd">
						<p>新密码</p>
						<input type="password" v-model.trim="input6" />
					</div>
					<div class="origin_pwd">
						<p>确认密码</p>
						<input type="password" v-model.trim="input7" />
					</div>
				</div>
				<button class="modify_pwd" @click="modifyPwd">修改</button>
			</div>

			<!-- 线下详情 -->
			<div class="show_detail" v-if="datas">
				<el-dialog title="" top="30px" :visible.sync="dialogVisible" width="70%">
					<div class="d_header">
						<h2>{{ datas.storeName }}提交的材料</h2>
						<div>
							<p v-if="datas.comefrom===0">来源：未知</p>
							<p v-if="datas.comefrom===1">来源：app</p>
							<p v-if="datas.comefrom===2">来源：微信</p>
							<p>木丰账号：{{ datas.uid }}</p>
							<p>类型：线下电商</p>
							<p v-if="datas.auditor===0">审核员：{{ username }}</p>
						</div>
					</div>
					<div class="d_tables">
						<table cellspacing="0" cellpadding="0" border="1" bordercolor="#dfdfdf">
							<tr style="font-size:15px;color:#000;">
								<th colspan="2">基本资料</th>
								<th colspan="2">证件材料</th>
							</tr>
							<tr>
								<td class="common1">店铺名称：</td>
								<td class="common2">{{ datas.storeName }}({{ datas.shop_id }})</td>
								<td class="common1">店铺头像：</td>
								<td>
									<img @click="enlarge(1)" class="imgS" :src="datas.storeAvatar" alt="" />
								</td>
							</tr>
							<tr>
								<td class="common1">主营业务：</td>
								<td class="common2">{{ datas.catName }}</td>
								<td class="common1">餐饮开户许可证：</td>
								<td>
									<img @click="enlarge(2)" class="imgS" :src="datas.foodLicencePath" alt="" />
								</td>
							</tr>
							<tr>
								<td class="common1">运营者姓名：</td>
								<td class="common2">{{ datas.uname }}</td>
								<td class="common1">身份证正反面：</td>
								<td>
									<img @click="enlarge(3)" class="imgS" :src="datas.scard_1" alt="" />
									<img @click="enlarge(4)" class="imgS" :src="datas.scard_2" alt="" />
								</td>
							</tr>
							<tr>
								<td class="common1">运营者身份证号码：</td>
								<td class="common2">{{ datas.scardid }}</td>
								<td class="common1">企业营业执照：</td>
								<td><img @click="enlarge(5)" class="imgS" :src="datas.licencePath" alt="" /></td>
							</tr>
							<tr>
								<td class="common1">所在地(详细地址)：</td>
								<td class="common2">{{ datas.provinceName+datas.cityName+datas.countyName+datas.address }}</td>
								<td class="common1">绑定宝店客：</td>
								<td v-if="datas.proxyUid===0">未绑定</td>
								<td v-else>已绑定&nbsp;{{ datas.proxyUid }}</td>
							</tr>
							<tr>
								<td class="common1">手机号码：</td>
								<td class="common2">{{ datas.phone }}</td>
								<td class="common1">上线：</td>
								<td v-if="!datas.fuid">无</td>
								<td v-else>{{ datas.fuid }}</td>
							</tr>
							<tr>
								<td class="common1">商店介绍：</td>
								<td>{{ datas.introduce }}</td>
								<td></td>
								<td></td>
							</tr>
						</table>
					</div>
					<div class="d_footer">
						<div class="d_footer_1">审核操作</div>
						<div class="d_footer_2">
							<select v-model="value4">
								<option value="0">待审核</option>
								<option value="1">审核通过</option>
								<option value="-1">审核不通过</option>
								<option value="-2">删除</option>
							</select>
							<textarea resize="none" v-model.trim="input4">
							</textarea>
						</div>
						<div class="d_footer_3">
							<h3>选择通知方式</h3>
							<el-checkbox-group v-model="checkList" style="display:flex;flex-flow:column;">
								<el-checkbox label="1" :disabled="disable1">APP通知</el-checkbox>
								<el-checkbox label="3" :disabled="disable2">短信通知</el-checkbox>
								<el-checkbox label="2" :disabled="disable3">公众号通知</el-checkbox>
							</el-checkbox-group>
						</div>
						<div class="d_footer_4">
							<button @click="submits">提交修改</button>
						</div>
					</div>
				</el-dialog>
			</div>

			<!-- 线上详情 -->
			<div class="show_detail" v-if="datas_1">
				<el-dialog title="" top="30px" :visible.sync="dialogVisible_1" width="70%">
					<div class="d_header">
						<h2>{{ datas_1.storeName }}提交的材料</h2>
						<div>
							<p v-if="datas_1.comefrom===0">来源：未知</p>
							<p v-if="datas_1.comefrom===1">来源：app</p>
							<p v-if="datas_1.comefrom===2">来源：微信</p>
							<p>木丰账号：{{ datas_1.uid }}</p>
							<p v-if="datas_1.shop_type===0">类型：媒体运营</p>
							<p v-if="datas_1.shop_type===1">类型：线上电商</p>
							<p v-if="datas_1.shop_type===2">类型：个人号</p>
							<p v-if="datas_1.shop_type===3">类型：原厂直销</p>
							<p v-if="datas_1.auditor===0">审核员：{{ username }}</p>
						</div>
					</div>
					<div class="d_tables">
						<table cellspacing="0" cellpadding="0" border="1" bordercolor="#dfdfdf">
							<tr style="font-size:15px;color:#000;">
								<th colspan="2">基本资料</th>
								<th colspan="2">证件材料</th>
							</tr>
							<tr>
								<td class="common1">店铺名称：</td>
								<td class="common2">{{ datas_1.storeName }}({{ datas_1.store_id }})</td>
								<td class="common1">店铺头像：</td>
								<td>
									<img @click="enlarge(11)" class="imgS" :src="datas_1.storeAvatar" alt="" />
								</td>
							</tr>
							<tr>
								<td class="common1">主营业务：</td>
								<td class="common2">{{ datas_1.catName }}</td>
								<td class="common1">银行开户许可证：</td>
								<td>
									<img @click="enlarge(12)" class="imgS" :src="datas_1.licencePath" alt="" />
								</td>
							</tr>
							<tr>
								<td class="common1">运营者姓名：</td>
								<td class="common2">{{ datas_1.uname }}</td>
								<td class="common1">法定代表人身份证：</td>
								<td>
									<img @click="enlarge(13)" class="imgS" :src="datas_1.represent_idcard" alt="" />
								</td>
							</tr>
							<tr>
								<td class="common1">运营者身份证号码：</td>
								<td class="common2">{{ datas_1.scardid }}</td>
								<td class="common1">个人身份证：</td>
								<td>
									<img @click="enlarge(14)" class="imgS" :src="datas_1.scard_1" alt="" />
								</td>
							</tr>
							<tr>
								<td class="common1">所在地(详细地址)：</td>
								<td class="common2">{{ datas_1.provinceName+datas_1.cityName+datas_1.countyName+datas_1.address }}</td>
								<td class="common1">企业营业执照：</td>
								<td><img @click="enlarge(15)" class="imgS" :src="datas_1.licencePath" alt="" /></td>
							</tr>
							<tr>
								<td class="common1">手机号码：</td>
								<td class="common2">{{ datas_1.phone }}</td>
								<td class="common1">绑定宝店客：</td>
								<td v-if="datas_1.proxyUid===0">未绑定</td>
								<td v-else>已绑定&nbsp;{{ datas_1.proxyUid }}</td>
							</tr>
							<tr>
								<td class="common1">上线：</td>
								<td v-if="!datas_1.fuid">无</td>
								<td v-else>{{ datas_1.fuid }}</td>
								<td class="common1"></td>
								<td ></td>								
							</tr>
						</table>
					</div>
					<div class="d_footer">
						<div class="d_footer_1">审核操作</div>
						<div class="d_footer_2">
							<select v-model="value4_1">
								<option value="0">待审核</option>
								<option value="1">审核通过</option>
								<option value="-1">审核不通过</option>
								<option value="-2">删除</option>
							</select>
							<textarea resize="none" v-model.trim="input4_1">
							</textarea>
						</div>
						<div class="d_footer_3">
							<h3>选择通知方式</h3>
							<el-checkbox-group v-model="checkList_1" style="display:flex;flex-flow:column;">
								<el-checkbox label="1" :disabled="disable1_1">APP通知</el-checkbox>
								<el-checkbox label="3" :disabled="disable2_1">短信通知</el-checkbox>
								<el-checkbox label="2" :disabled="disable3_1">公众号通知</el-checkbox>
							</el-checkbox-group>
						</div>
						<div class="d_footer_4">
							<button @click="submits_1">提交修改</button>
						</div>
					</div>
				</el-dialog>
			</div>

			<!-- 创客详情 -->
			<div class="show_detail" v-if="datas_22">
				<el-dialog title="" top="30px" :visible.sync="dialogVisible_22" width="70%">
					<div class="d_header">
						<h2>{{ datas_22.storeName }}提交的材料</h2>
						<div>
							<p v-if="datas_22.comefrom===0">来源：未知</p>
							<p v-if="datas_22.comefrom===1">来源：app</p>
							<p v-if="datas_22.comefrom===2">来源：微信</p>
							<p>木丰账号：{{ datas_22.uid }}</p>
							<p>类型：线上电商</p>
							<p v-if="datas_22.auditor===0">审核员：{{ username }}</p>
						</div>
					</div>
					<div class="d_tables">
						<table cellspacing="0" cellpadding="0" border="1" bordercolor="#dfdfdf">
							<tr style="font-size:15px;color:#000;">
								<th colspan="2">基本资料</th>
								<th colspan="2">证件材料</th>
							</tr>
							<tr>
								<td class="common1">身份证号码：</td>
								<td class="common2">{{ datas_22.cardid }}</td>
								<td class="common1">身份证照片：</td>
								<td><img @click="enlarge(21)" class="imgS" :src="datas_22.cardurl" alt="" /></td>
							</tr>
							<tr>
								<td class="common1">手机号码：</td>
								<td class="common2">{{ datas_22.phone }}</td>
								<td class="common1">宝店客头像：</td>
								<td><img @click="enlarge(22)" class="imgS" :src="datas_22.head_pic" alt="" /></td>
							</tr>
							<tr>
								<td class="common1">名称：</td>
								<td>{{ datas_22.name }}</td>
								<td class="common1">创建时间：</td>
								<td class="common2">{{ datas_22.created | removeT }}</td>
							</tr>
							<tr>
								<td class="common1"></td>
								<td class="common2"></td>
								<td class="common1"></td>
								<td></td>
							</tr>
							<tr>
								<td class="common1"></td>
								<td class="common2"></td>
								<td class="common1"></td>
								<td></td>
							</tr>
							<tr>
								<td class="common1"></td>
								<td class="common2"></td>
								<td class="common1"></td>
								<td></td>
							</tr>
						</table>
					</div>
					<div class="d_footer">
						<div class="d_footer_1">审核操作</div>
						<div class="d_footer_2">
							<select v-model="value4_22">
								<option value="0">待审核</option>
								<option value="1">审核通过</option>
								<option value="-1">审核不通过</option>
								<option value="-2">删除</option>
							</select>
							<textarea resize="none" v-model.trim="input4_22">
							</textarea>
						</div>
						<div class="d_footer_3">
							<h3>选择通知方式</h3>
							<el-checkbox-group v-model="checkList_22" style="display:flex;flex-flow:column;">
								<el-checkbox label="1" :disabled="disable1_22">APP通知</el-checkbox>
								<el-checkbox label="3" :disabled="disable2_22">短信通知</el-checkbox>
								<el-checkbox label="2" :disabled="disable3_22">公众号通知</el-checkbox>
							</el-checkbox-group>
						</div>
						<div class="d_footer_4">
							<button @click="submits_22">提交修改</button>
						</div>
					</div>
				</el-dialog>
			</div>

		</div>
		<!-- 阴影 -->
		<div class="mask" v-if="isMask" @click="closeMask" @mousewheel="larger">
			<p>滚轮控制缩放</p>
			<img v-if="imgIndex===1" class="mask_img" :src="datas.storeAvatar" alt="" />
			<img v-if="imgIndex===2" class="mask_img" :src="datas.foodLicencePath" alt="" />
			<img v-if="imgIndex===3" class="mask_img" :src="datas.scard_1" alt="" />
			<img v-if="imgIndex===4" class="mask_img" :src="datas.scard_2" alt="" />
			<img v-if="imgIndex===5" class="mask_img" :src="datas.licencePath" alt="" />

			<img v-if="imgIndex===11" class="mask_img" :src="datas_1.storeAvatar" alt="" />
			<img v-if="imgIndex===12" class="mask_img" :src="datas_1.licencePath" alt="" />
			<img v-if="imgIndex===13" class="mask_img" :src="datas_1.represent_idcard" alt="" />
			<img v-if="imgIndex===14" class="mask_img" :src="datas_1.scard_1" alt="" />
			<img v-if="imgIndex===15" class="mask_img" :src="datas_1.licencePath" alt="" />

			<img v-if="imgIndex===21" class="mask_img" :src="datas_22.cardurl" alt="" />
			<img v-if="imgIndex===22" class="mask_img" :src="datas_22.head_pic" alt="" />
		</div>
	</div>
</template>

<script>
	import { setCookie, getCookie, removeCookie, clearCookie } from '@/assets/js/cookie.js'
	import acti from './acti'
	import seck from './seck'
	import ad from './ad'
	export default {
		name: 'audit_list',
		data() {
			return {
				manageList: [{
					id: 1,
					img: require('../../assets/images/auditSystem/offline.png')
				}, {
					id: 2,
					img: require('../../assets/images/auditSystem/online.png')
				}, {
					id: 3,
					img: require('../../assets/images/auditSystem/Maker.png')
				}, {
					id: 4,
					img: require('../../assets/images/auditSystem/act.png')
				}, {
					id: 5,
					img: require('../../assets/images/auditSystem/seckill.png')
				}, {
					id: 6,
					img: require('../../assets/images/auditSystem/ad.png')
				}, {
					id: 99,
					img: require('../../assets/images/auditSystem/setting.png')
				}],
				urls: '',
				username: '',
				selIndex: 1,
				input1: '',
				input1_1: '',
				value1: '',
				value1_1: '',
				option1_1: [{
					value: '99',
					label: '全部'
				}, {
					value: '0',
					label: '未知'
				}, {
					value: '1',
					label: 'app'
				}, {
					value: '2',
					label: '微信'
				}],
				value2: '',
				value2_1: '',
				option2: [{
					value: '选项1',
					label: '宝店1'
				}, {
					value: '选项2',
					label: '宝店2'
				}, {
					value: '选项3',
					label: '宝店3'
				}, {
					value: '选项4',
					label: '宝店4'
				}, {
					value: '选项5',
					label: '宝店5'
				}],
				value3: '',
				value3_1: '',
				option3: [{
					value: '99',
					label: '全部'
				}, {
					value: '0',
					label: '待审核'
				}, {
					value: '1',
					label: '审核通过'
				}, {
					value: '-1',
					label: '审核不通过'
				}, {
					value: '-2',
					label: '删除'
				}],
				option3_1: [{
					value: '99',
					label: '全部'
				}, {
					value: '0',
					label: '待审核'
				}, {
					value: '1',
					label: '审核通过'
				}, {
					value: '-1',
					label: '审核不通过'
				}, {
					value: '-2',
					label: '删除'
				}],
				loading1: true,
				loading1_1: true,
				tableData: '',
				tableData_1: '',
				page1: 1,
				page1_1: 1,
				pageSize1: 5,
				pageSize1_1: 5,
				dialogVisible: false,
				dialogVisible_1: false,
				checked1: false,
				checked1_1: false,
				checked2: false,
				checked2_1: false,
				checked3: false,
				checked3_1: false,
				disable1: false,
				disable1_1: false,
				disable2: false,
				disable2_1: false,
				disable3: false,
				disable3_1: false,
				checkList: [],
				checkList_1: [],
				value4: 1,
				value4_1: 1,
				input4: '',
				input4_1: '',
				input5: '',
				input5_1: '',
				input6: '',
				input6_1: '',
				input7: '',
				input7_1: '',
				objs: '',
				objs_1: '',
				ID: '',
				ID_1: '',
				datas: '',
				datas_1: '',
				flagss: true,
				flagss_1: true,
				flagss_22: true,
				params: '',
				isMask: false,
				imgIndex: 1,
				scaleNum: 0,
				input22: '',
				page22: 1,
				pageSize22: 5,
				objs22: '',
				loading22: true,
				tableData22: '',
				value22: '',
				option22: [{
					value: '99',
					label: '全部'
				}, {
					value: '0',
					label: '未知'
				}, {
					value: '1',
					label: 'app'
				}, {
					value: '2',
					label: '微信'
				}],
				value23: '',
				option23: [{
					value: '99',
					label: '全部'
				}, {
					value: '0',
					label: '待审核'
				}, {
					value: '1',
					label: '审核通过'
				}, {
					value: '-1',
					label: '审核不通过'
				}, {
					value: '-2',
					label: '删除'
				}],
				disable1_22: false,
				disable2_22: false,
				disable3_22: false,
				checkList_22: [],
				datas_22: '',
				ID_22: '',
				dialogVisible_22: false,
				value4_22: '',
				input4_22: '',
				shopType: 0, //宝店类型 0-媒体运营 1-线上电商 2-个人号 3-原厂直销
			}
		},
		components: {
			acti,
			seck,
			ad
		},
		computed: {},
		created() {
			if(!getCookie('UID') || !getCookie('TOKEN')) {
				this.$router.push('/login');
			}
			this.params = '?uid=' + getCookie('UID') + '&token=' + getCookie('TOKEN');

			if(localStorage.getItem('auditUserName')) {
				this.username = localStorage.getItem('auditUserName');
			}
			this.urls = 'https://www.mofing.com/users/avatar/index/' + getCookie('UID') + '/middle';
			this.lists();
		},
		watch: {
			selIndex: {
				handler(val) {
					this.loading1 = this.loading1_1 = this.loading22 = true;
					if(val === 1) {
						this.lists();
					} else if(val === 2) {
						this.lists_1();
					} else if(val === 3) {
						this.lists2();
					}
				},
				deep: true
			},
		},
		methods: {
			//线下列表
			lists() {
				let obj = {};
				let str = '';
				obj.page = this.page1;
				obj.limit = this.pageSize1;
				str += '&limit=' + this.pageSize1 + '&page=' + this.page1;
				this.$axiosPost('/mall-admin/check/offline.json' + this.params + str, this.objs, true).then(res => {
					if(res.code === 200) {
						this.loading1 = false;
						this.tableData = res;
					} else if(res.code === 404) {
						this.loading1 = false;
						this.tableData = '';
					}
				})
			},
			//线上列表
			lists_1() {
				let obj = {};
				let str = '';
				obj.page = this.page1_1;
				obj.limit = this.pageSize1_1;
				obj.sourceid = this.value1_1;
				str += '&limit=' + this.pageSize1_1 + '&page=' + this.page1_1 + '&sourceid=' + this.value1_1;
				this.$axiosPost('/mall-admin/check/online.json' + this.params + str, this.objs_1, true).then(res => {
					if(res.code === 200) {
						this.loading1_1 = false;
						this.tableData_1 = res;
					} else if(res.code === 404) {
						this.loading1_1 = false;
						this.tableData_1 = '';
					}
				})
			},
			//创客
			lists2() {
				let obj = {};
				let str = '';
				obj.page = this.page22;
				obj.limit = this.pageSize22;
				str += '&limit=' + this.pageSize22 + '&page=' + this.page22;
				this.$axiosPost('/mall-admin/check/bckmaker.json' + this.params + str, this.objs22, true).then(res => {
					if(res.code === 200) {
						this.loading22 = false;
						this.tableData22 = res;
					} else if(res.code === 404) {
						this.loading22 = false;
						this.tableData22 = '';
					}
				})
			},
			//退出登录
			loginOut() {
				let self = this;
				this.$confirm('是否确定退出?', '提示', {
					confirmButtonText: '确定',
					cancelButtonText: '取消',
					type: 'warning'
				}).then(() => {
					self.$axiosGet('/account/logout.json' + this.params, '', true).then(res => {
						if(res.code === 200) {
							self.$message({
								type: 'success',
								message: res.data
							});
							setTimeout(() => {
								clearCookie();
								localStorage.clear();
								sessionStorage.clear();
								self.$router.push('/login');
							}, 200);
						}
					})
				}).catch(() => {
					this.$message({
						type: 'info',
						message: '已取消操作'
					});
				});
			},
			//切换导航
			selects(id) {
				this.selIndex = id;
			},
			handleSizeChange(val) {
				this.loading1 = true;
				this.pageSize1 = val;
				this.lists();
			},
			handleSizeChange_1(val) {
				this.loading1_1 = true;
				this.pageSize1_1 = val;
				this.lists_1();
			},
			handleSizeChange22(val) {
				this.loading22 = true;
				this.pageSize22 = val;
				this.lists2();
			},
			handleCurrentChange(val) {
				this.loading1 = true;
				this.page1 = val;
				this.lists();
			},
			handleCurrentChange_1(val) {
				this.loading1_1 = true;
				this.page1_1 = val;
				this.lists_1();
			},
			handleCurrentChange22(val) {
				this.loading22 = true;
				this.page22 = val;
				this.lists2();
			},
			//键盘查询
			enters(val) {
				if(val.keyCode === 13) {
					this.querys();
				}
			},
			//键盘查询
			enters_1(val) {
				if(val.keyCode === 13) {
					this.querys_1();
				}
			},
			//键盘查询
			enters22(val) {
				if(val.keyCode === 13) {
					this.querys22();
				}
			},
			//查询
			querys() {
				this.loading1 = true;
				let obj = {};
				obj.keyword = this.input1 ? this.input1 : '';
				if(this.value3 && this.value3 !== '99') {
					obj.status = this.value3;
				} else {
					obj.status = '';
				}
				this.objs = obj;
				this.lists();

			},
			//查询
			querys_1() {
				this.loading1_1 = true;
				let obj = {};
				obj.keyword = this.input1_1 ? this.input1_1 : '';
				if(this.value1_1 && this.value1_1 !== '99') {
					obj.sourceid = this.value1_1;
				} else {
					obj.sourceid = '';
				}
				if(this.value3_1 && this.value3_1 !== '99') {
					obj.status = this.value3_1;
				} else {
					obj.status = '';
				}
				this.objs_1 = obj;
				this.lists_1();

			},
			//查询
			querys22() {
				this.loading22 = true;
				let obj = {};
				obj.keyword = this.input22 ? this.input22 : '';
				if(this.value22 && this.value22 !== '99') {
					obj.sourceid = this.value22;
				} else {
					obj.sourceid = '';
				}
				if(this.value23 && this.value23 !== '99') {
					obj.status = this.value23;
				} else {
					obj.status = '';
				}
				this.objs22 = obj;
				this.lists2();

			},
			//详情
			goDetail(id) {
				this.disable1 = this.disable2 = this.disable3 = false;
				this.checkList = [];
				this.datas = '';
				this.ID = +id;
				this.dialogVisible = true;
				let str = '/mall-admin/check/detail/' + this.ID + '.json';
				this.$axiosGet(str + this.params, '', true).then(res => {
					if(res.code === 200) {
						this.datas = res.data;
						this.value4 = res.data.status;
						this.input4 = res.data.auditMessage ? res.data.auditMessage : '';
						if(res.data.comefrom === 0) {
							this.disable1 = this.disable2 = this.disable3 = true;
						} else if(res.data.comefrom === 1) {
							this.disable3 = true;
							this.checkList = ['1', '3'];
						} else if(res.data.comefrom === 2) {
							this.disable1 = true;
							this.checkList = ['2', '3'];
						}
					}
				})
			},
			//详情
			goDetail_1(id, shop_id) {
				this.shopType = shop_id;
				this.disable1_1 = this.disable2_1 = this.disable3_1 = false;
				this.checkList_1 = [];
				this.datas_1 = '';
				this.ID_1 = +id;
				this.dialogVisible_1 = true;
				let str = '/mall-admin/check/detailon/' + this.ID_1 + '.json';
				this.$axiosGet(str + this.params, '', true).then(res => {
					if(res.code === 200) {
						this.datas_1 = res.data;
						this.value4_1 = res.data.status;
						this.input4_1 = res.data.auditMessage ? res.data.auditMessage : '';
						if(res.data.comefrom === 0) {
							this.disable1_1 = this.disable2_1 = this.disable3_1 = true;
						} else if(res.data.comefrom === 1) {
							this.disable3_1 = true;
							this.checkList_1 = ['1', '3'];
						} else if(res.data.comefrom === 2) {
							this.disable1_1 = true;
							this.checkList_1 = ['2', '3'];
						}
					}
				})
			},
			//详情
			goDetail22(id) {
				this.disable1_22 = this.disable2_22 = this.disable3_22 = false;
				this.checkList_22 = [];
				this.datas_22 = '';
				this.ID_22 = +id;
				this.dialogVisible_22 = true;
				let str = '/mall-admin/check/bckdetail/' + this.ID_22 + '.json';
				this.$axiosGet(str + this.params, '', true).then(res => {
					if(res.code === 200) {
						this.datas_22 = res.data;
						this.value4_22 = res.data.status;
						this.input4_22 = res.data.auditMessage ? res.data.auditMessage : '';
						if(res.data.comefrom === 0) {
							this.disable1_22 = this.disable2_22 = this.disable3_22 = true;
						} else if(res.data.comefrom === 1) {
							this.disable3_22 = true;
							this.checkList_22 = ['1', '3'];
						} else if(res.data.comefrom === 2) {
							this.disable1_22 = true;
							this.checkList_22 = ['2', '3'];
						}
					}
				})
			},
			//提交
			submits() {
				if(this.value4 != 1 && this.input4 == '') {
					this.$alert('请输入审核信息', '提示', {
						confirmButtonText: '确定'
					});
					return;
				}
				if(!this.flagss) {
					return;
				}
				let obj = {};
				let self = this;
				let strr = '';
				obj.id = this.datas.id;
				obj.auditor = getCookie('UID');
				obj.auditMessage = this.input4;
				obj.status = this.value4;
				this.checkList.sort();
				obj.noticeWay = this.checkList.join();
				this.$axiosPost('/mall-admin/check/submitoff.json' + this.params, obj, true).then(res => {
					this.flagss = false;
					if(res.code === 200) {
						self.lists();
						this.$message({
							type: 'success',
							message: '操作成功!'
						});
						setTimeout(() => {
							self.flagss = true;
							self.dialogVisible = false;
						}, 1500);
					} else if(res.code === 404) {
						this.$message({
							type: 'info',
							message: '该条已审核通过,无需重复提交'
						});
						setTimeout(() => {
							self.flagss = true;
							self.dialogVisible = false;
						}, 1500);
					}
				})
			},
			//线上提交
			submits_1() {
				if(this.value4_1 != 1 && this.input4_1 == '') {
					this.$alert('请输入审核信息', '提示', {
						confirmButtonText: '确定'
					});
					return;
				}
				if(!this.flagss_1) {
					return;
				}
				let obj = {};
				let self = this;
				let strr = '';
				obj.id = this.datas_1.id;
				obj.auditor = getCookie('UID');
				obj.auditMessage = this.input4_1;
				obj.status = this.value4_1;
				this.checkList_1.sort();
				obj.noticeWay = this.checkList_1.join();
				if(this.shopType === 1||this.shopType === 2||this.shopType === 3) {
					this.$axiosPost('/mall-admin/check/submiton.json' + this.params, obj, true).then(res => {
						this.flagss_1 = false;
						if(res.code === 200) {
							self.lists_1();
							this.$message({
								type: 'success',
								message: '操作成功!'
							});
							setTimeout(() => {
								self.flagss_1 = true;
								self.dialogVisible_1 = false;
							}, 1500);
						} else if(res.code === 404) {
							this.$message({
								type: 'info',
								message: '该条已审核通过,无需重复提交'
							});
							setTimeout(() => {
								self.flagss_1 = true;
								self.dialogVisible_1 = false;
							}, 1500);
						}
					})
				} else if(this.shopType === 0) { //媒体得换个接口，醉了
					this.$axiosPost('/mall-admin/check/mediasubmit.json' + this.params, obj, true).then(res => {
						this.flagss_1 = false;
						if(res.code === 200) {
							self.lists_1();
							this.$message({
								type: 'success',
								message: '操作成功!'
							});
							setTimeout(() => {
								self.flagss_1 = true;
								self.dialogVisible_1 = false;
							}, 1500);
						} else if(res.code === 404) {
							this.$message({
								type: 'info',
								message: '该条已审核通过,无需重复提交'
							});
							setTimeout(() => {
								self.flagss_1 = true;
								self.dialogVisible_1 = false;
							}, 1500);
						}
					})
				}
			},
			submits_22() {
				if(this.value4_22 != 1 && this.input4_22 == '') {
					this.$alert('请输入审核信息', '提示', {
						confirmButtonText: '确定'
					});
					return;
				}
				if(!this.flagss_22) {
					return;
				}
				let obj = {};
				let self = this;
				let strr = '';
				obj.id = this.datas_22.id;
				obj.auditor = getCookie('UID');
				obj.auditMessage = this.input4_22;
				obj.status = this.value4_22;
				this.checkList_22.sort();
				obj.noticeWay = this.checkList_22.join();
				this.$axiosPost('/mall-admin/check/bcksubmit.json' + this.params, obj, true).then(res => {
					this.flagss_22 = false;
					if(res.code === 200) {
						self.lists2();
						this.$message({
							type: 'success',
							message: '操作成功!'
						});
						setTimeout(() => {
							self.flagss_22 = true;
							self.dialogVisible_22 = false;
						}, 1500);
					} else if(res.code === 404) {
						this.$message({
							type: 'info',
							message: '该条已审核通过,无需重复提交'
						});
						setTimeout(() => {
							self.flagss_22 = true;
							self.dialogVisible_22 = false;
						}, 1500);
					}
				})
			},
			//修改密码
			modifyPwd() {
				if(this.input5 == '') {
					this.$alert('请输入原密码', '提示', {
						confirmButtonText: '确定'
					});
					return;
				}
				if(this.input6 == '') {
					this.$alert('请输入新密码', '提示', {
						confirmButtonText: '确定'
					});
					return;
				}
				if(this.input7 == '') {
					this.$alert('请输入确认密码', '提示', {
						confirmButtonText: '确定'
					});
					return;
				}
				let obj = {};
				obj.current = this.input5;
				obj.modify = this.input6;
				obj.remodify = this.input7;
				this.$axiosPost('/users/password/reset.json' + this.params, obj, true).then(res => {
					if(res.code === 200) {
						this.$message({
							type: 'success',
							message: res.data
						});
					} else if(res.code === 404) {
						this.$alert(res.message, '提示', {
							confirmButtonText: '确定'
						});
						return;
					}
				})
			},
			//放大
			enlarge(id) {
				this.isMask = true;
				this.imgIndex = id;
			},
			//关闭阴影
			closeMask() {
				this.isMask = false;
			},
			//滚轮控制放大缩小
			larger() {
				let ev = window.event;
				let oImg = document.querySelector('.mask_img');
				if(ev.deltaY > 0) { //向下滚  缩小
					this.scaleNum--;
					if(this.scaleNum <= 1) {
						this.scaleNum = 1;
					}
					oImg.style.transform = 'scale(' + this.scaleNum + ')';
				} else { //向上滚  放大
					this.scaleNum++;
					if(this.scaleNum >= 5) {
						this.scaleNum = 5;
					}
					oImg.style.transform = 'scale(' + this.scaleNum + ')';
				}
			},
		},
		filters: {
			removeT(val) {
				if(!val) {
					return '--';
				}
				val = '' + val;
				return val.replace(/T/, ' ');
			},
		}
	}
</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped lang="less">
	.audit_list {
		height: 100%;
		background: url('../../assets/images/auditSystem/bg.png') no-repeat;
		background-size: 100% 100%;
		display: flex;
		justify-content: center;
		align-items: center;
		.mask {
			position: absolute;
			left: 0;
			right: 0;
			top: 0;
			bottom: 0;
			margin: auto;
			background: #000;						
			z-index: 9999;
			display: flex;
			justify-content: center;
			align-items: center;
			p {
				position: absolute;
				left: 50%;
				top: 10px;
				transform: translateX(-50%);
				font-size: 22px;
				color: #fff;
			}
			.mask_img {
				width: 220px;
			}
		}
		.content {
			width: 80%;
			height: 92%;
			background: #fff;
			display: flex;
			.lefts {
				width: 9.6%;
				height: 100%;
				background: #6296ea;
				.user_login {
					padding-bottom: 20px;
					background: #5deb99;
					display: flex;
					flex-direction: column;
					align-items: center;
					img {
						width: 45px;
						height: 45px;
						border-radius: 50%;
						margin: 14px 0 10px 0;
					}
					p {
						width: 100%;
						font-size: 11px;
						color: #fff;
						word-wrap: break-word;
					}
					h3 {
						font-size: 13px;
						color: #fff;
						cursor: pointer;
						margin-top: 7px;
					}
				}
				.nav_lists {
					margin-top: 38px;
					.nav_list {
						height: 70px;
						position: relative;
						cursor: pointer;
						display: flex;
						align-items: center;
						justify-content: center;
						img {
							width: 40px;
							height: 40px;
						}
						.selected {
							position: absolute;
							left: 0;
							top: 0;
							width: 4px;
							height: 70px;
							background: #5deb99;
						}
					}
					.white {
						background: #9dc3f6;
					}
				}
			}
			.rights {
				width: 90.6%;
				.nav_title {
					display: flex;
					align-items: center;
					padding: 20px 0 12px 25px;
					border-bottom: 1px solid #f4f4f4;
					h1 {
						font-size: 20px;
						color: #000;
					}
					p {
						font-size: 16px;
						color: #929292;
						margin-left: 6px;
					}
				}
				.border_right {
					width: 93.71%;
					margin: 18px auto;
					.conditions {
						height: 32px;
						background: #e8e8e8;
						display: flex;
						align-items: center;
						justify-content: space-around;
						.condition1 {
							display: flex;
							align-items: center;
							p {
								font-size: 15px;
								color: #000;
								margin-right: 6px;
								white-space: nowrap;
							}
							input {
								width: 226px;
								height: 24px;
								font-size: 15px;
								color: #000;
								padding: 0 10px;
							}
						}
						button {
							width: 112px;
							height: 28px;
							line-height: 28px;
							background: #6296ea;
							font-size: 16px;
							color: #fff;
							border-radius: 5px;
						}
					}
					.data_lists {
						padding: 50px 0;
						height: 550px;
						overflow: auto;
					}
					.pages {
						text-align: right;
						padding: 0 20px;
					}
				}
				.options_pwd {
					display: flex;
					flex-direction: column;
					align-items: center;
					margin: 120px 0 96px 0;
					.origin_pwd {
						display: flex;
						align-items: center;
						margin-top: 24px;
						p {
							width: 92px;
							font-size: 22px;
							color: #3c3643;
							margin-right: 38px;
							text-align: left;
						}
						input {
							width: 262px;
							height: 40px;
							border: 1px solid #3c3643;
							color: #000;
							padding: 0 22px;
						}
					}
				}
				.modify_pwd {
					width: 112px;
					height: 30px;
					line-height: 30px;
					background: #6296ea;
					font-size: 16px;
					color: #fff;
					border-radius: 5px;
				}
			}
			.show_detail {
				.d_header {
					width: 100%;
					margin: 0 auto;
					display: flex;
					align-items: center;
					justify-content: space-between;
					padding: 20px 35px;
					h2 {
						font-size: 19px;
						color: #000;
					}
					>div {
						display: flex;
						p {
							font-size: 12px;
							color: #585858;
							margin-left: 24px;
						}
					}
				}
				.d_tables {
					table {
						width: 91.7%;
						margin: 0 auto;
						th {
							width: 50%;
							height: 30px;
							background: #ddf0fe;
						}
						td {
							width: 25%;
							height: 58px;
						}
					}
					.common1 {
						font-size: 10px;
						color: #7f7f7f;
					}
					.common2 {
						font-size: 14px;
						color: #000;
						font-weight: 700;
					}
					.imgS {
						width: 40px;
						cursor: pointer;
					}
				}
				.d_footer {
					height: 212px;
					background: #535353;
					display: flex;
					align-items: center;
					justify-content: space-around;
					.d_footer_1 {
						width: 0;
						font-size: 18px;
						color: #fff;
						margin: 0 45px;
					}
					.d_footer_2 {
						display: flex;
						flex-direction: column;
						select {
							width: auto;
							height: 41px;
							background: #535353;
							font-size: 24px;
							color: #fff;
							padding: 0 40px 0 60px;
						}
						textarea {
							outline: none;
							background: #535353;
							width: 256px;
							height: 126px;
							font-size: 14px;
							color: #fff;
							padding: 10px;
							margin-top: 10px;
						}
					}
					.d_footer_3 {
						display: flex;
						flex-direction: column;
						h3 {
							font-size: 23px;
							color: #fff;
							font-weight: 400;
							margin-bottom: 10px;
						}
					}
					.d_footer_4 {
						button {
							width: 172px;
							height: 42px;
							line-height: 42px;
							background: #34cf95;
							font-size: 20px;
							color: #fff;
						}
					}
				}
			}
		}
	}
</style>